/**
* @file 我的团队
* @author 张超
* @created 2023/8/24 08:00
* @updated 2023/8/24 18:00
*/
<template>
	<view class="tuand">
		<view class="mine-box">
			<view class="ellipse">
			</view>
		</view>
		<view class="tuand-box">
			<view class="">
				<view class="">直属客户</view>
				<view class="">{{downs}}</view>
			</view>
			<view class="">
				<view class="">部门客户</view>
				<view class="">{{allnums}}</view>
			</view>
		</view>
		<view class="tuand-cont">
			<view class="title">客户列表</view>
			<ul>
				<li v-for="(item,index) in list" :key="index">
					<image :src="item.avatar" mode=""></image>
					<view class="">
						<text>{{item.nickname}}</text>
						<text>已抢购次数:{{item.overcounts}}</text>
						<text>ID:{{item.ownid}}</text>
					</view>
				</li>
			</ul>
		</view>
	</view>
</template>

<script>
	import {
		teamList
	} from '@/network/api.js'
	export default {
		data() {
			return {
				list:[],
				downs:'',
				allnums:'',
				page:1
			}
		},
		onLoad(optios) {
			this.teamListRe()
		},
		onReachBottom() {
			this.page++
			this.teamListRe()
		},
		methods: {
			teamListRe() {
				let data={
					page:this.page,
					pagesize:10
				}
				teamList(data).then(res => {
					this.downs=res.data.downs
					this.allnums=res.data.allnums
					if(this.page==1){
						this.list=res.data.list.data
					}else{
						this.list=[...this.list,...res.data.list.data]
					}
				})
			}
		},
	}
</script>

<style>
	page {
		background-color: #f3f3f3;
	}
</style>

<style lang="scss">
	.tuand {
		.mine-box {
			.ellipse {
				width: 100%;
				height: 321rpx;
				position: relative;
				overflow: hidden;

				&::after {
					content: '';
					display: block;
					background: linear-gradient(90deg, rgba(59, 59, 59, 1), rgba(59, 59, 59, 1));
					position: absolute;
					bottom: 0;
					left: 50%;
					width: 660px;
					height: 350px;
					margin-left: -330px;
					border-radius: 50%;
					z-index: 2;
				}
			}
		}

		.tuand-box {
			display: flex;
			justify-content: space-around;
			position: absolute;
			top: 150rpx;
			left: 5%;
			z-index: 999;
			width: 90%;
			height: 230rpx;
			padding: 60rpx 30rpx;
			background: url("../../../static/shop/fsad.png") no-repeat;
			background-size: 100% 100%;

			>view {
				>view:nth-child(1) {
					font-size: 30rpx;
					font-family: PingFang SC, PingFang SC-Medium;
					color: #333333;
				}

				>view:nth-child(2) {
					text-align: center;
					font-size: 48rpx;
					font-family: PingFang SC, PingFang SC-Bold;
					color: #b27715;
				}
			}
		}

		.tuand-cont {
			margin-top: 60rpx;
			padding: 30rpx;

			.title {
				font-size: 36rpx;
				font-family: PingFang SC, PingFang SC-Bold;
				font-weight: 700;
				color: #333333;
			}

			>ul {
				margin-top: 30rpx;

				>li {
					display: flex;
					align-items: center;
					padding: 20rpx;
					margin-bottom: 30rpx;
					background-color: #fff;

					>image {
						width: 100rpx;
						height: 100rpx;
						border-radius: 50%;
					}

					>view:nth-child(2) {
						margin-left: 20rpx;

						>text:nth-child(1) {
							display: block;
							font-size: 30rpx;
							color: #333333;
						}

						>text:nth-child(2) {
							display: block;
							font-size: 24rpx;
							color: #333333
						}
					}
				}
			}
		}
	}
</style>